package com.cloud.spring.crazy.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class ConfigController {
	@Autowired
	private ApplicationContext cxt;

	@GetMapping(value = "config")
	@ResponseBody
	public String getProp() {
		//��ȡĬ�������ļ� application.properties
		String userName = cxt.getEnvironment().getProperty("test.user.name");

		return userName;

	}

}
